:root {
  --bg: #0b1021;
  --panel: #0f1635;
  --text: #e3e7ff;
  --muted: #9aa4d3;
  --primary: #6c8cff;
  --primary-strong: #4a6aff;
  --accent: #15d1a3;
  --danger: #ff6b6b;
  --border: #1d2a5b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: #0b1021;
  color: var(--text);
}

/* SaaS 布局 */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(180deg, #0d1331 0%, #0b1021 100%);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.brand-logo { font-size: 22px; }
.brand-title { font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: grid; gap: 4px; margin-top: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  background: transparent; color: #c9cff7; border: 1px solid transparent;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; text-align: left;
}
.nav-item:hover { background: #0f1635; border-color: #1c2a5d; }
.nav-item.active { background: #111a41; border-color: #2a3a76; color: #fff; }
.nav-ico { width: 18px; text-align: center; }
.nav-sep { height: 1px; background: var(--border); margin: 8px 0; }

.main { display: grid; grid-template-rows: 56px 1fr; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--border); background: #0d1331; }
.top-title { font-weight: 700; }
.top-link { color: var(--muted); text-decoration: none; }
.container { padding: 18px; display: grid; gap: 16px; max-width: 1280px; }

.card {
  background: linear-gradient(180deg, rgba(18,27,70,0.6), rgba(15,22,53,0.9));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.card h2 { margin: 0 0 10px; font-size: 18px; }

.form { display: grid; gap: 10px; }
.form textarea, .form input[type="url"] {
  width: 100%;
  background: #0e1432;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.form button {
  width: max-content;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
}
.form button:disabled { opacity: .6; cursor: not-allowed; }
.form button:not(:disabled):hover { background: var(--primary-strong); }

.error { color: var(--danger); background: #290f17; border: 1px solid #5a2131; padding: 8px 10px; border-radius: 10px; }

.result { margin-top: 12px; }
.result-header { display: flex; align-items: center; gap: 10px; }
.tag { font-size: 12px; color: #b2baf0; border: 1px solid #32407e; background: #11183b; padding: 2px 8px; border-radius: 999px; }
.steps { margin: 10px 0 0; padding-left: 18px; }
.steps li { margin: 8px 0; display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.step-num { color: #bcd; font-weight: 600; }
.method { font-weight: 600; }
.desc { color: var(--muted); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.kv { background: #0f1431; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { margin-top: 4px; }

.img-preview { margin-top: 12px; }
.img-preview .label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.img-preview img { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }


